import request from '@/utils/request'

export function getSettings() {
  return request({
    url: `/api/app/settings`,
    method: 'get'
  })
}
export function updateSettings(data) {
  return request({
    url: `/api/app/settings`,
    method: 'put',
    data
  })
}

export function getAboutSetting() {
  return request({
    url: '/api/app/settings/about',
    method: 'get'
  })
}

export function updateAboutSetting(data) {
  return request({
    url: '/api/app/settings/about',
    method: 'put',
    data
  })
}

export function getContactSetting() {
  return request({
    url: '/api/app/settings/contact',
    method: 'get'
  })
}

export function updateContactSetting(data) {
  return request({
    url: '/api/app/settings/contact',
    method: 'put',
    data
  })
}

export function changeLanguage(data) {
    return request({
        url: '/api/app/settings/change-language',
        method: 'post',
        data
    })
}
